#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void reverse(char* str, int len)
{
    int left = 0;
    int right = len - 1;
    while (left < right)
    {
        char tmp = str[left];
        str[left] = str[right];
        str[right] = tmp;
        left++;
        right--;
    }
}
char* solve(char* s, char* t)
{
    // write code here
    if (s == NULL)
        return t;
    if (t == NULL)
        return s;

    int lens = strlen(s);
    int lent = strlen(t);
    reverse(s, lens);
    reverse(t, lent);

    char* arr = (char*)malloc(sizeof(char) * 100001);
    int pos = 0;
    int flag = 0;
    while (*s != '\0' && *t != '\0')
    {
        char x = *s + *t-'0';
        if (x + flag <= '9')
        {
            arr[pos++] = x + flag;
            flag = 0;
        }
        else
        {
            x = x + flag - 10;
            flag = 1;
            arr[pos++] = x;
        }
        s++;
        t++;
    }
    while (*s != '\0')
    {
        char x = *s;
        if (x + flag <= '9')
        {
            arr[pos++] = x + flag;
            flag = 0;
        }
        else
        {
            x = x + flag - 10;
            flag = 1;
            arr[pos++] = x;
        }
        s++;
    }
    while (*t != '\0')
    {
        char x = *t;
        if (x + flag <= '9')
        {
            arr[pos++] = x + flag;
            flag = 0;
        }
        else
        {
            x = x + flag - 10;
            flag = 1;
            arr[pos++] = x;
        }
        t++;
    }
    if (flag == 1)
    {
        arr[pos++] = '1';
    }
    arr[pos] = '\0';
    reverse(arr, pos);
    return arr;
}

int main()
{
    char s[] = "733064366";
    char t[] = "459309139";
    char* ret=solve(s, t);
    printf("%s\n", ret);
}